<HTML>
<HEAD>
<TITLE>Create admin</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8">
<link rel="stylesheet" href="template/stylesheet.css">
</HEAD>
<BODY BGCOLOR=#FFFFFF leftmargin="0" topmargin="0" marginheight=0 marginwidth=0 rightmargin=0 bottommargin=0 background="images/back.gif" link="#0000FF" vlink="#0000FF" alink="#0000FF">



<script>
function prov() {
    var fc1 = document.getElementsByName('fCreateddomain')[0];
    var fc2 = document.getElementsByName('fCreatedalias')[0];
    var fm0 = document.getElementsByName('fMaxalias')[0];
    var fm1 = document.getElementsByName('fMaxmailbox')[0];
    var fm2 = document.getElementsByName('fMaxdomain')[0];
    var fm3 = document.getElementsByName('fMaxsizemailbox')[0];
    var fm4 = document.getElementsByName('fMaxsizedomain')[0];
    if(!fc1.checked) {
        fc2.disabled = true; fm0.disabled = true; fm1.disabled = true; fm2.disabled = true;  fm3.disabled = true;  fm4.disabled = true;
    }
    else {
        fc2.disabled = false;
         }

         
if(fc1.checked) {
fc2.disabled = false; fm0.disabled = false; fm1.disabled = false; fm2.disabled = false; fm3.disabled = false; fm4.disabled = false;
}
else {
fc2.disabled = true;
}

    if(!fc2.checked) { fm0.style.display = 'none'; }
    else { fm0.style.display = 'block'; }

}
</script>




<div id="login_header">
<img id="login_header_logo" src="template/images/postbox.png" />
<img id="login_header_logo" src="template/images/postfixadmin2.png" />
</div>
<div id="menu">
<ul>

<TMPL_IF NAME="WELCOME">
  You called as:<b><strong class="yellow1"> <TMPL_VAR NAME="USERSE"> </strong></b> 
  <a href="index.pl?action=logout"><b><strong class="yellow1"> To go out</a></strong></b> 
  </br> </br> </br> </br>
</TMPL_IF>

   <li><a target="_top" href="index.pl">home</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=listdomain">Domain List</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=listvirtual">Virtual List</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=createdomain">New Domain</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=createalias">Add Alias</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=createmailbox">Add Mailbox</a></li>
   
      <TMPL_IF NAME="ADMIN_SEE">
   </br> </br> </br> </br>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=logms">Log SimpleMail</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=log">Log MTA</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=createadmin">Add Admin</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=listadmin">Domain Admin</a></li>
   <li><a target="_top" href="index.pl?action=postfix&postfixactive=setting">Setting</a></li>
   </TMPL_IF>
   
</ul>
</div>


<div id="edit_form">
<form name="create_admin" method="post">
      <input type="hidden" name="postfixform" value="createadmin2">
<table>
   <tr>
      <td colspan="3"><h3>Add a new domain admin</h3></td>

   </tr>
   <tr>
      <td>Admin:</td>
      <td><input class="flat" type="text" name="fUsername" value="" /></td>
      <td>&nbsp;
      
      
      
      <TMPL_IF NAME="fUsername_correct">
      <br /><span class="error_msg">This Username uncorrect!</span>
      </TMPL_IF> 
      
      <TMPL_IF NAME="fUsername_correct_exist">
      <br /><span class="error_msg">This Username no exists!</span>
      </TMPL_IF> 

     
      </td>
   </tr>
   <tr>
      <td>Password:</td>

      <td><input class="flat" type="password" name="fPassword" /></td>
      <td>&nbsp;
      
      <TMPL_IF NAME="fPass_correct">
      <br /><span class="error_msg">The passwords is not valid!enter no less than XXX characters!</span>
      </TMPL_IF> 
      
      </td>
   </tr>
   <tr>
      <td>Password (again):</td>
      <td><input class="flat" type="password" name="fPassword2" /></td>
      <td>&nbsp;
      
      <TMPL_IF NAME="fPass2_correct">
      <br /><span class="error_msg">The passwords did not coincide!</span>
      </TMPL_IF>
      
      </td>
   </tr>
   
   
   
   
   


   <tr>
      <td>Enable to create domains:</td>
      <td><input class="flat" type="checkbox" name="fCreateddomain" onclick="prov();"/></td>
      <td>&nbsp;
      
      <TMPL_IF NAME="no_fDomains_error">
      <br /><span class="error_msg">If forbade to create domains, it is needed to choose even one domain, accordingly the chosen domain will belong to this new user!</span>
      </TMPL_IF>
      
      </td>
   </tr>
   
   <tr>
      <td>Enable to create Alias:</td>
      <td><input class="flat" type="checkbox" name="fCreatedalias" onclick="prov();" checked /></td>
      <td>&nbsp;</td>
   </tr>

   <tr>
      <td>Max alias <span class="error_msg">*</span>:</td>
      <td><input class="flat" type="text" name="fMaxalias" value="0" onclick="prov();" /></td>
      <td>0 - unlimited
      
      <TMPL_IF NAME="fMaxalias_correct">
      <br /><span class="error_msg">This Maxalias uncorrect!</span>
      </TMPL_IF>
      
      </td>
   </tr>
   
   <tr>
      <td>Max Mailbox <span class="error_msg">**</span>:</td>
      <td><input class="flat" type="text" name="fMaxmailbox" value="0" onclick="prov();" /></td>
      <td>0 - unlimited

      <TMPL_IF NAME="fMaxmailbox_correct">
      <br /><span class="error_msg">This Maxmailbox uncorrect!</span>
      </TMPL_IF>      
      
      </td>
   </tr>

   <tr>
      <td>Max Domain<span class="error_msg">***</span>:</td>
      <td><input class="flat" type="text" name="fMaxdomain" value="0" onclick="prov();" /></td>
      <td>0 - unlimited
      
      <TMPL_IF NAME="fMaxdomain_correct">
      <br /><span class="error_msg">This Maxdomain uncorrect!</span>
      </TMPL_IF>
      
      </td>
   </tr>

   <tr>
      <td>Max size of Mailbox(Mb) <span class="error_msg">****</span>:</td>
      <td><input class="flat" type="text" name="fMaxsizemailbox" value="0" onclick="prov();" /></td>
      <td>0 - unlimited

      <TMPL_IF NAME="fMaxsizemailbox_correct">
      <br /><span class="error_msg">This Maxsizemailbox uncorrect!</span>
      </TMPL_IF>
      
      </td>
   </tr>
   
   <tr>
      <td>Max size of all mailboxes in a new domain (Mb)<span class="error_msg">*****</span>: <br> (0 is recommended)</td>
      <td><input class="flat" type="text" name="fMaxsizedomain" value="0" onclick="prov();" /></td>
      <td>0 - unlimited
      
      <TMPL_IF NAME="fMaxsizedomain_correct">
      <br /><span class="error_msg">This Maxsizedomain uncorrect!</span>
      </TMPL_IF>
                  
      </td>
   </tr>   
   
   <tr>
      <td>Domain<span class="error_msg">******</span>:</td>
      <td>
      <select name="fDomains" size="10" multiple="multiple">
     <TMPL_LOOP NAME="ROWS">      <option value="<TMPL_VAR NAME="domain">"><TMPL_VAR NAME="domain">
    
     </option> </TMPL_LOOP>
selected><TMPL_VAR NAME="admin2">     
      </select>
      </td>
      <td>&nbsp;
      
      <TMPL_IF NAME="fDomains_no_correct">
      <br /><span class="error_msg">This Domains no correct!</span>
      </TMPL_IF>
      
      <TMPL_IF NAME="fDomains_no_exist">
      <br /><span class="error_msg">This Domains no exists!</span>
      </TMPL_IF>
      
      <TMPL_IF NAME="no_fDomains">
      <br /><span class="error_msg">This Domains no!</span>
      </TMPL_IF>
      
      </td>
   </tr>

   <tr>
      <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="Add Admin" /></td>
   </tr>
   <tr>
      <td colspan="3" class="standout">&nbsp;
      
       <TMPL_IF NAME="admin_added">
      <br />Admin has been added!</span>
      </TMPL_IF>
      
      </td>
   </tr>
   
   <tr>
      <td colspan="3" class="help_text">
      description of chart:<br />
        <br />      
if ('Enable to create domains:') { <br />
    if ('Enable to create Alias') { <br />
    Max alias: <br />
    } else {  <br /> 
     Max alias -1, off edit/create/delete<br />
    } <br />  
Max Mailbox: <br />  	
Max Domain: <br />		
Max size of Domain <br /> 
Max size of Mailbox <br />
<br />
} else {<br />
Domain:<br />
}
              
              
                   <br />
           
              
              </td>
   </tr>
   

   <tr>
      <td><span class="error_msg">*</span> - maximal amount of aliases for one mailbox (if creation of boxes is turned off, this value is ignored)</td>

   </tr>

   <tr>
        <td>
   <span class="error_msg">**</span> - maximal amount of mailboxes for one new domain
         </td>
   </tr>
   
      <tr>
        <td>
   <span class="error_msg">***</span> - maximal amount of the created domains
         </td>
   </tr>
   
      <tr>
        <td>
   <span class="error_msg">****</span> - maximal size for the created mailboxes which are created in the new created domain
         </td>
   </tr>
   
      <tr>
        <td>
   <span class="error_msg">*****</span> - maximal size of all mailboxes which are created in new created
         </td>
   </tr>
   
    <tr>
        <td>
   <span class="error_msg">******</span> - if to the user it will be forbidden to create domains, it is needed to choose a domain from a list
         </td>
   </tr>
   
</table>
</form>
</div>





</table>
<div id="footer">
<a target="_blank" href="http://postfixadmin.com/">Design by Postfixadmin. All rights reserved</a>
</div>





<TR>
		<TD valign="top" bgcolor="#FFFFFF">
     <p align="center"><small><font size="1" face="Verdana">Copyright 2008++ <a target="_blank" href="http://unixforum.org.ua">Simplemail</a>
        . All rights reserved</font></small></p>
       </TD>
	</TR>
</BODY>
</HTML>
